Preparing for Your Professional Machine Learning Engineer Journey

Google Cloud PMLE( Professional Machine Learning Engineer )專業機器學習工程師認證考試

Sample Question 2 / Question ID: 78

Question / 題目

You are developing a model to identify traffic signs in images extracted from videos taken from the dashboard of a vehicle. You have a dataset of 100,000 images that were cropped to show one out of ten different traffic signs. The images have been labeled accordingly for model training, and are stored in a Cloud Storage bucket. You need to be able to tune the model during each training run. How should you train the model? 您正在開發一個模型,用於識別從車輛儀表板拍攝的影片中提取的圖像之中的交通標誌。您擁有一個包含 100,000 張圖像的數據集,這些圖像已被裁剪以顯示十種不同交通標誌的其中之一。這些圖像已進行相應的標籤標記以用於模型訓練,並儲存在 Cloud Storage 貯存桶中。您需要在每次訓練運行期間能夠調整(微調)模型。您應該如何訓練該模型?

A: Train a model for object detection by using Vertex AI AutoML. A: 使用 Vertex AI AutoML 訓練一個物件偵測模型。

B: Train a model for image classification by using Vertex AI AutoML. B: 使用 Vertex AI AutoML 訓練一個圖像分類模型。

C: Develop the model training code for object detection, and train a model by using Vertex AI custom training. C: 開發用於物件偵測的模型訓練程式碼,並使用 Vertex AI 自訂訓練來訓練模型。

D: Develop the model training code for image classification, and train a model by using Vertex AI custom training. D: 開發用於圖像分類的模型訓練程式碼,並使用 Vertex AI 自訂訓練來訓練模型。


Analysis / 解析

A. Wrong. Vertex AI AutoML handles hyperparameter tuning and model architecture search automatically but does not allow you to manually tune the model or custom code during each training run. Additionally, because the images have already been "cropped to show one out of ten different traffic signs," the problem is an image classification task (identifying the category of the entire cropped image) rather than an object detection task (locating multiple objects via bounding boxes). A. 錯誤。Vertex AI AutoML 會自動處理超參數調整和模型架構搜尋,但不允許您在每次訓練運行期間手動調整模型或自訂程式碼。此外,由於圖像已經被「裁剪以顯示十種不同交通標誌的其中之一」,因此該任務是圖像分類任務(識別整個裁剪後圖像的類別),而不是物件偵測任務(透過邊界框定位多個物件)。

B. Wrong. Although this is an image classification problem, using Vertex AI AutoML does not satisfy the requirement: "You need to be able to tune the model during each training run." AutoML operates as a black-box system where users cannot inject custom code or granularly modify parameters during runtime. B. 錯誤。雖然這是一個圖像分類問題,但使用 Vertex AI AutoML 無法滿足「您需要在每次訓練運行期間能夠調整模型」的要求。AutoML 作為一個黑盒子系統運行,使用者無法在運行期間注入自訂程式碼或細粒度地修改參數。

C. Wrong. Custom training allows for manual tuning, which fulfills part of the requirement. However, developing code for object detection is incorrect for this scenario. The images are already cropped around single traffic signs, meaning you only need to classify the single category of the image rather than detecting the spatial coordinates (bounding boxes) of multiple signs. C. 錯誤。自訂訓練允許手動調整,這滿足了部分需求。然而,在這種情況下開發物件偵測的程式碼是不正確的。圖像已經圍繞單個交通標誌進行了裁剪,這意味著您只需要對圖像的單個類別進行分類,而不需要偵測多個標誌的空間座標(邊界框)。

D. Correct. This option addresses both key constraints of the prompt. First, because the images are cropped to exhibit exactly one traffic sign, the core machine learning task is image classification. Second, using Vertex AI custom training allows you to write your own model training code (e.g., using TensorFlow or PyTorch), giving you complete flexibility to manually tune hyperparameters, alter network layers, or adjust parameters during each training run. D. 正確。此選項同時解決了題目中的兩個關鍵限制。首先,由於圖像已裁剪為恰好顯示一個交通標誌,因此核心機器學習任務是圖像分類。其次,使用 Vertex AI 自訂訓練(Custom Training)允許您編寫自己的模型訓練程式碼(例如使用 TensorFlow 或 PyTorch),從而為您提供完全的靈活性,以便在每次訓練運行期間手動調整超參數、更改網路層或調整參數。